import { get, post } from "../utils/request";
import { getToken } from "../utils/auth";

// 二次封装注册
export const regApi = (user) => post("/api/v1/auth/reg", user);

// 封装登录
export const loginApi = (user) => post("/api/v1/auth/login", user);

//获取用户信息
export const infoApi = () => get("/api/v1/users/info", getToken());

//修改用户信息
export const changeInfo = (data) => post("/api/v1/users/change_info", data);
export const changePwd = (data) => post("/api/v1/users/change_pwd", data);
